SELECT col7, col8 , LAST_VALUE(col8) OVER(PARTITION BY col7 ORDER BY col8) LAST_VALUE_col8 FROM "allTypsUniq.parquet"